package com.example.leetcode.slidingwindow;

import com.example.leetcode.slidingwindow.common.SlidingWindowUtils;

class Solution3 {
    // 给定一个字符串 s ，请你找出其中不含有重复字符的 最长子串 的长度。
    public int lengthOfLongestSubstring(String s) {
//        return SlidingWindowUtils.lengthOfLongestSubstring(s);
        return SlidingWindowUtils.lengthOfLongestSubstringPro(s);
    }
}

public class leetcode3 {
    public static void main(String[] args) {
        Solution3 solution3 = new Solution3();
        System.out.println(solution3.lengthOfLongestSubstring("abcabcbb"));
        System.out.println(solution3.lengthOfLongestSubstring("bbbbb"));
        System.out.println(solution3.lengthOfLongestSubstring("pwwkew"));
        System.out.println(solution3.lengthOfLongestSubstring("pw"));
        System.out.println(solution3.lengthOfLongestSubstring("abba"));
    }
}
